package com.huqing.icu.service.savestrategy;

import com.huqing.icu.enums.HouseOwnerEnum;
import com.huqing.icu.inout.in.app.HouseAddReq;
import com.huqing.icu.inout.in.app.HouseUpdateReq;
import com.huqing.icu.utils.ParamValidateUtils;
import org.springframework.stereotype.Service;

/**
 * 二手房东上传房源
 *
 * @author huqing
 * @date 2024-09-28 22:05
 */
@Service
public class SecondLandlordHouseSaveService extends AbstractHouseSaveService {
    @Override
    public boolean judgeHouseOwner(Integer houseOwner) {
        return HouseOwnerEnum.SECOND_LANDLORD.getCode().equals(houseOwner);
    }

    @Override
    public void checkAddReq(HouseAddReq addReq) {
        ParamValidateUtils.validateNotNull(addReq.getWaterPrice(), "水费不能为空");
        ParamValidateUtils.validateNotNull(addReq.getElectricityPrice(), "电费不能为空");
        ParamValidateUtils.validateNotNull(addReq.getPropertyManageFee(), "物业费或管理费不能为空");
        ParamValidateUtils.validateNotNull(addReq.getAgencyPrice(), "中介费不能为空");
    }

    @Override
    public Integer insert(HouseAddReq addReq) {
        return null;
    }

    @Override
    public Integer update(HouseUpdateReq updateReq) {
        return null;
    }
}
